RMarkdown for Presentations

Mike McCarthy

2022-10-24

Create a new R Markdown Presentation

Go to the File menu at the top left of RStudio, choose New File, then select R Markdown…

Dropdown Menus

Choose a slidy Presentation Template

Select a Presentation from the list on the left slide.

Fill in the title, author, and date.

Pick a Slidy or ioslides presentation. ioslides is a bit simpler, and Slidy has more options for customization. Most output features are identical.

Templates

R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

Slide with Bullets

Slide with R Output

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Slide with Plot

Slide with Methane Plot from Web Data

Interactive Methane Plot

You will need to install.packages('plotly') to run this code.

Maps

Maps work as usual, mostly. The +/- changes slides.

## Reading layer `CalEJ' from data source 
##   `https://raw.githubusercontent.com/RadicalResearchLLC/EDVcourse/main/CalEJ4/CalEJ.geoJSON' 
##   using driver `GeoJSON'
## Simple feature collection with 3747 features and 66 fields
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: 97418.38 ymin: -577885.1 xmax: 539719.6 ymax: -236300
## Projected CRS: NAD83 / California Albers